// 导入axios实例
import httpRequest from "../request/index";

// 根据id查询信息
export function apiUpdatePwd(param) {
  return httpRequest({
    url: "/api/updatePwd",
    method: "post",
    data: param,
  });
}
// 记录访客数量
export function apiGetVisitorsAndPublish(param) {
  return httpRequest({
    url: "/api/getVisitorsAndPublish",
    method: "get",
    params: param,
  });
}
/** 查询所有比自己等级低的用户
 * param：{role}，创建者的role
 */
export function apiGetUserList(param) {
  return httpRequest({
    url: "/api/getUserList",
    method: "get",
    params: param,
  });
}
/** 新建用户
 * param：{userId}，创建者的id
 */
export function apiCreateUser(param) {
  return httpRequest({
    url: "/api/createUser",
    method: "post",
    data: param,
  });
}
/** 删除用户
 * param：{userId}，删除的id
 */
export function apiDeleteUser(param) {
  return httpRequest({
    url: "/api/deleteUser",
    method: "post",
    data: param,
  });
}
/** 重置用户密码123456  e10adc3949ba59abbe56e057f20f883e
 * param：{userId}，重置用户的id
 */
export function apiResetUserPwd(param) {
  return httpRequest({
    url: "/api/resetUserPwd",
    method: "post",
    data: param,
  });
}